In an Android development process, especially in the case numerous interfaces of an application are opened, common logout manners often cannot achieve complete logout of all interfaces of this application, and if the application cannot be completely logged out and still exists in memory, the memory space is occupied, resulting in waste of system resources.
The method for completely logging out of an application by common means is that a management container of a singleton set List <Activity> is enabled in the application program, and every time when the interface Activity of the application program is opened in the Android system, the current Activity is added to the container, and when complete logout is required, the container is traversed cyclically to close each Activity, thus achieving the function of complete logout of the application.
Although this logout method can achieve the purpose of complete logout, set maintenance is a very complicated process, and because the set has reference to the Activity, a memory leak problem is caused.
Therefore, the method for logging out of an application program in the Android system in the prior art has the technical problem that complete logout and memory leak avoidance cannot be achieved at the same time.